<?php
namespace app\before\validate;

use think\Validate;

class AdPrice extends Validate
{
    protected $rule = [
        'foreign_key' => 'require|number',
        'price' => 'require|number',

       // 'city' => 'require|number',
    ];
    protected $message = [
        'foreign_key.require' => '请选择广告位',
        'foreign_key.number' => '广告位有误',
        'price.require' => '请输入价格',
        'price.number' => '价格需为数字',

        /*'city.require' => '请选择城市',
        'city.number' => '城市有误',*/
    ];
    protected $scene = [
        'edit' => [
            'foreign_key',
            'price',

            //'city',
        ],
    ];
}
